#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdlib.h>
int main()
{
    int pid;

    pid = fork();

    if(pid == 0){
        printf("%d I am child1 %d\n" , getpid(),getpid());

    }else if(pid > 0){
        int pid2 = fork();

        if(pid2 == 0) {
        printf("%d I am child2 %d\n" , getpid(),getpid());
        
        }else if(pid2> 0){
             printf("%d I am partent %d\n" , getpid(),getpid());
               
        }else{
             printf("ProcessCreate Failed!");
        }
        return 0;
    }
    }
    
     
